<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        function fn(name) {
            console.log(name);

        }
        fn(123);
        fn('字符串')
        fn(true);
        fn([1, 2, 3, 4, 5]);
        fn({ name: '刘德华' });
        fn(function () { });
        var fun = function () { };
        fn(fun);
        var o = {
            sayHi: function () {
                console.log('hello');
            }
        }
        function foo() {
            var a = 10;
            var b = Math.random();
            return b;
        }
        var num = foo();
        console.log(num);
        var num1 = foo();
        console.log(num1);
        function foo1(){
            var a = 10;
            var b = Math.random();
            return function fn1(){
                return b;
            }
        }
        var numberFn = foo1();
        var number1 = numberFn();
        var number2 = numberFn();
        console.log(number1);
        console.log(number2);
        
    </script>
</body>

</html>